/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rh.util;

/**
 *
 * @author Hayden
 */
public class Parser {
    public static String trim(String s)  {
        if (s == null)  return "";
        return s.trim();
    }
    
    public static int intValue(String s)  {
        int i = 0;
        try  {
            s = trim(s);
            if (s.length() == 0)  return 0;
            i = Integer.valueOf(s);
        }
        catch (NumberFormatException nfe)  {
        }
        return i;
    }
}
